package com.sky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;


import com.github.pagehelper.Page;
import com.sky.dto.CateDTO;
import com.sky.entity.Category;
import com.sky.entity.FirstCategory;
import com.sky.entity.SecondCategory;
import com.sky.entity.ThirdCategory;
import com.sky.vo.FirstCategoryVO;
import com.sky.vo.SecondCategoryVO;
import com.sky.vo.ThirdCategoryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

@Mapper
public interface CategoryMapper extends BaseMapper<Category> {
    List<FirstCategory> getFirstCategoryList();

    List<SecondCategory> getSecondCategoryList();

    List<ThirdCategory> getThirdCategoryList();

    Page<FirstCategoryVO> first();

    Page<SecondCategoryVO> second();

    Page<ThirdCategoryVO> third();

    Category firstDetail(Integer id);

    Category secondDetail(Integer id);

    Category thirdDetail(Integer id);

    void firstUpdate(CateDTO cateDTO);

    void secondUpdate(CateDTO cateDTO);

    void thirdUpdate(CateDTO cateDTO);

    void firstDelete(Integer id);

    void secondDelete(Integer id);

    void thirdDelete(Integer id);

    List<Category> batchFirstDetail(@Param("ids") Collection<Integer> fIds);

    List<Category> batchSecondDetail(@Param("ids") Collection<Integer> sIds);

    List<Category> batchThirdDetail(@Param("ids") Collection<Integer> tIds);

    void firstSave(CateDTO cateDTO);

    void secondSave(CateDTO cateDTO);

    void thirdSave(CateDTO cateDTO);
}
